package org.example.blogserver.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {

    public static String longToString(long timestamp, String format) {
        Date date = new Date(timestamp);
        SimpleDateFormat dateFormat = new SimpleDateFormat(format);
        return dateFormat.format(date);
    }


}
